package com.googlecode.astoolkit.utils {
	
	dynamic public class Node extends AbstractNode implements INode {
		
		public function Node(data:XML) {
			super(data);
			
			id = data.@id;
			//label = data.@label;
			this.path= data.@path;
			//className = data.@className;
			var parent_id:int = data.parent().@id;
			parent = Sitemap.getNodeById(parent_id);
			parent.addChildNode(this);
			//parent=null;
			//showInContextMenu = (data.@showInContextMenu == "true");
			
		}
		
		public function toString():String{
			//return "[object Node id:\""+id+"\" link:\""+link+"\" numChildren:\""+children.length + " instance:"+instance+"]";
			return "[object Node id:\""+id+"\" numChildren:\""+children.length + "]";
		} 

	}
}